<h1>Foo</h1>

<pre class=metadata>
Group: test
Shortname: foo
Level: 1
Status: DREAM
ED: http://example.com/foo
Abstract: Test of markdown code constructs.
Editor: Example Editor
Date: 1970-01-01
Markup Shorthands: markdown on
Boilerplate: omit document-revision
</pre>

"code1": `code1`

"code2": This is `code2`.

"code spaces": This one has `code spaces`.

"code link": This one is <a href="#">in a `code link`</a>.

"not code": Here's some \`literal backticks\`

"multi-backtick code": This code is ``delimited ``` by two `s``, so it can include single or triple backticks.

"code block"
```
This is a code block.
```

"tilda code block"
~~~
this code block has tildas,
```
and isn't closed by backticks
```
TODO: move fixText() into the markdown handler, so it doesn't operate on raw lines;
TODO: right now it'll make replacements in scripts, which is obviously bad :(
~~~


foo

"long code block"
````
this code block starts with 4 backticks
```
so it's not closed by the 3 backticks above
but it's closed with way more than 4 backticks
````````

some final non-code text to make sure things get closed correctly
